New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test/e2e/framework : move AddOrUpdateTaintOnNode to subpackage node #90190
Conversation
after moving this function , i will remove the direct dependency for internal k8s.io/kubernetes |
test/e2e/framework/node/resource.go
Outdated
@@ -38,6 +38,9 @@ import ( | |||
clientretry "k8s.io/client-go/util/retry" | |||
e2elog "k8s.io/kubernetes/test/e2e/framework/log" | |||
"k8s.io/kubernetes/test/e2e/system" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is better to move the TODO before this line because it also needs to be removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch.Thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/cc @oomichi
hi,how about this now?
/retest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
test/e2e/framework/node/resource.go
Outdated
func AddOrUpdateTaintOnNode(c clientset.Interface, nodeName string, taint v1.Taint) { | ||
err := controller.AddOrUpdateTaintOnNode(c, nodeName, &taint) | ||
|
||
// TODO use wrapper methods in expect.go after removing core e2e dependency on node |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO use wrapper methods in expect.go after removing core e2e dependency on node
What do you mean by "core e2e dependency on node"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that means framework core package can't dependency sub-package /test/e2e/framework/node , the core package should not depend on the subpackage as much as possible ,the topic is from #81245 .
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move E2E Framework into Staging has higher priority.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
after moving this function , i will remove the direct dependency for internal k8s.io/kubernetes
removing the direct dependency for internal k8s.io/kubernetes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand that the e2e test framework should not import its own subpackages, and that decoupling the e2e test framework and its subpackages is higher priority than any other cleanup work in the e2e test framework.
What isn't clear from that comment is
- why you changed the call to
ExpectNoError()
, - what "core e2e dependency" actually means?
- and what dependency is there on "node" (
core e2e dependency on node
)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/cc @alejandrox1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will update the conflict after we get the answer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excuse the delay. Coming around to, and I apologize for the vagueness. I understand the issue here but my comment was about properly communicating it in the comment
TODO use wrapper methods in expect.go after removing core e2e dependency on node
that comment does not properly communicate what you have been discussing here @tanjunchen .
If we are going to leave TODOs in the code base we should also assume that we will forget about them and someone else will eventually find them and try to resolve them.
The comment you have here does fully communicate the work to be done.
A better comment could be something like
TODO use wrapper methods in expect.go after removing the dependency on this
package from the core e2e framework.
My comment here is just for us to standardize on the language we used to talk about things.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
get it,Thanks for your comment,i will update it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@oomichi @alejandrox1
done. pls review this again! Thanks
/retest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/approve
/lgtm
Thank you @tanjunchen !
/retest |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: alejandrox1, tanjunchen The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/retest Review the full test history for this PR. Silence the bot with an |
/retest |
1 similar comment
/retest |
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
after moving this function , i will remove the direct dependency for internal k8s.io/kubernetes
Which issue(s) this PR fixes:
ref:#77095
/cc @oomichi
/cc @alejandrox1
Special notes for your reviewer:
Does this PR introduce a user-facing change?:
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: